{% extends 'base/base.html' %}
{% load static %}
{% block title %}
      <title>书籍首页</title>
{% endblock %}

{% block body %}

    {% for b in pages.object_list %}
        <div class="media">
          <div class="media-left">
              <img class="media-object" src="{% static 'img/收藏.png' %}" alt="...">
          </div>
          <div class="media-body">
            <h4 class="media-heading">{{ b.title }}</h4>
            {{ b.des }}
          </div>
        </div>
    {% endfor %}



    <nav aria-label="Page navigation">
      <ul class="pagination">
          {% if pages.has_previous %}
        <li>
          <a href="?page={{ pages.pervious_page_number }}" aria-label="Previous">
            <span aria-hidden="true">&laquo;</span>
          </a>
        </li>
          {% endif %}

          {% for page in pages.paginator.get_elided_page_range %}
        <li><a href="?page={{ page }}">{{ page }}</a></li>
          {% endfor %}

          {% if pages.has_next %}
        <li>
          <a href="?page={{ pages.next_page_number }}" aria-label="Next">
            <span aria-hidden="true">&raquo;</span>
          </a>
        </li>
          {% endif %}
      </ul>
    </nav>





{% endblock %}